package demo12;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] arr = new int[n][n];

        arr[0][0] = 1;

        for (int i = 1; i < n; i++) {
            arr[i][0] = 1;
            for (int j = 1; j < n; j++) {
                arr[i][j] = arr[i-1][j] + arr[i-1][j-1];
            }
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (arr[i][j] != 0){
                    System.out.printf("%5d",arr[i][j]);
                }
            }
            System.out.println();
        }

    }
}
